# -*- coding:utf-8 -*-

import re


__all__ = ('StringCheck',)


class StringCheck:

    def __init__(self):
        pass

    @staticmethod
    def is_chinese(string: str) -> bool:
        re_s = re.search(r'[\u4e00-\u9fff]', string)
        # 中文标点符号的Unicode范围
        cp_pattern = re.compile(
            r'[\u3002\uFF1F\uFF01\u3001\uFF0C\u300C\u300D\u300E\u300F\u2018\u2019\u201C\u201D\u2013\u2014\u2026\uFF08\uFF09\u3010\u3011\u300A\u300B]')
        cp_check = cp_pattern.search(string)
        if re_s is not None and cp_check is not None:
            return True

        return False

    @staticmethod
    def is_english(string: str) -> bool:
        re_s = re.search('[a-zA-Z]', string)
        # 英文标点符号示例
        ep_pattern = re.compile(r'[!"#$%&\'()*+,-./:;<=>?@[\\\]^_`{|}]')
        cp_check = ep_pattern.search(string)
        if re_s is not None and cp_check is not None:
            return True

        return False

    def is_all_chinese(self, string: str) -> bool:
        pass

    def is_all_english(self, string: str) -> bool:
        pass


if __name__ == '__main__':
    print('Hello world!')
